<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="./template.xhtml">

    <ui:define name="title">
        Terminal - <span class="subitem">Autocompletion</span>
    </ui:define>

    <ui:define name="description">
        <p>An autocomplete model can be also provided for the terminal, which will enable the autocompletion feature on the component.<br/>
        Autocompletion can be triggered using the TAB key. In case there are more alternatives for arguments, these can be clicked to override the current input.</p>
        <p>Try any of the following inputs as an example:</p>
        <ul>
            <li>TAB</li>
            <li><i>git</i> + TAB</li>
            <li><i>svn co</i> + TAB</li>
            <li><i>git pus</i> + TAB + TAB + TAB</li>
        </ul>
    </ui:define>

    <ui:param name="documentationLink" value="/components/terminal" />

    <ui:define name="implementation">

        <h:form>
            <p:focus for="terminal" />

            <p:terminal id="terminal" widgetVar="term"
                        commandHandler="#{terminalAutoCompleteView.handleCommand}"
                        autoCompleteModel="#{terminalAutoCompleteView.autoCompleteModel}"
                        welcomeMessage="Welcome to PrimeFaces Terminal, how are you today?" />

            <p:commandButton type="button" value="Clear" icon="pi pi-trash" onclick="PF('term').clear()" style="margin-top:10px"/>
        </h:form>

    </ui:define>

</ui:composition>